/**
 * @file Driver_Flash.h
 * @brief 
 * @author 2bam 
 * @version 1.0
 * @date 2024-11-24
 * @copyright Copyright (c) 2024  NULL
 * 
 * @change log:
 * Date           Version Author   Describe
 * 2024-11-24     1.0     2bam     first version
 */


#ifndef INC_DRIVER_FLASH_H_
#define INC_DRIVER_FLASH_H_


/* Includes -------------------------------------------------------------------*/

/* define ---------------------------------------------------------------------*/
#define FLASH_SECTOR_255_ADDR 0x0807F800



/* typedef --------------------------------------------------------------------*/

/* variables ------------------------------------------------------------------*/

/* Private function prototypes ------------------------------------------------*/





uint32_t Flash_ReadWord(uint32_t addr);
uint16_t Flash_ReadHalfWord(uint32_t addr);
uint8_t Flash_ReadByte(uint32_t addr);

uint8_t stmflash_erase_sector(uint32_t saddr);
void Flash_ErasePages(uint32_t addr);
void Flash_ProgramWord(uint32_t addr, uint32_t data);
void GetCpuInfo(void);

#endif /* INC_DRIVER_FLASH_H_ */
